package com.accesshollywood.GL;

public class FileSeqID {
	public String	baseName;
	public int		currSeqIndex;
	public int		numDigits;
	public String	extension;

	public FileSeqID(String base, int seqID, int numDigits, String ext){
		this.baseName = base;
		this.currSeqIndex = seqID;
		this.numDigits = numDigits;
		this.extension = ext;
	}
	
	public String filename(){
		return (baseName + pad(currSeqIndex,numDigits) + extension);
	}
	
	public String pad(int seqNum, int numDigits){
		String newNum = "";
		for(int i = 0; i < numDigits; i++){
			newNum += "0";
		}
		
		newNum += seqNum;
		newNum = newNum.substring(newNum.length() - numDigits, numDigits);
		
		return newNum;
	}
}
